Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Handling Edit Commands

The 3D Viewer provides routines that you can use to handle editing commands that apply to a viewer object.

Q3ViewerCut

You can use the Q3ViewerCut function to handle the Cut editing command when applied to data selected in a viewer object.

MAC OS VERSION

OSErr Q3ViewerCut (TQ3ViewerObject theViewer);

WINDOWS VERSION

TQ3Status Q3WinViewerCut (TQ3ViewerObject viewer);

PARAMETER

theViewer
A viewer object.

DESCRIPTION

The Q3ViewerCut function cuts the data currently selected in the viewer object specified by the theViewer parameter. The cut data is placed on the Clipboard. You should call Q3ViewerCut when the user chooses the Cut command in your application's Edit menu (or types the appropriate keyboard equivalent) and the selected data is inside a viewer pane.

Q3ViewerCopy

You can use the Q3ViewerCopy function to handle the Copy editing command when applied to data selected in a viewer object.

MAC OS VERSION

OSErr Q3ViewerCopy (TQ3ViewerObject theViewer);

WINDOWS VERSION

TQ3Status Q3WinViewerCopy (TQ3ViewerObject viewer);

PARAMETER

theViewer
A viewer object.

DESCRIPTION

The Q3ViewerCopy function copies the data currently selected in the viewer object specified by the theViewer parameter. The data is copied onto the Clipboard. You should call Q3ViewerCopy when the user chooses the Copy command in your application's Edit menu (or types the appropriate keyboard equivalent) and the selected data is inside a viewer pane.

Q3ViewerPaste

You can use the Q3ViewerPaste function to handle the Paste editing command when applied to data previously cut or copied from a viewer object.

MAC OS VERSION

OSErr Q3ViewerPaste (TQ3ViewerObject theViewer);

WINDOWS VERSION

TQ3Status Q3WinViewerPaste (TQ3ViewerObject viewer);

PARAMETER

theViewer
A viewer object.

DESCRIPTION

The Q3ViewerPaste function pastes 3D data from the Clipboard into the viewer object specified by the theViewer parameter. You should call Q3ViewerPaste when the user chooses the Paste command in your application's Edit menu (or types the appropriate keyboard equivalent) and the data on the Clipboard was placed there by a previous call to Q3ViewerCut or Q3ViewerCopy .

SEE ALSO

To determine whether the data on the Clipboard is 3D data or not, you can use the Q3ViewerGetState function (link) .

Q3ViewerClear

You can use the Q3ViewerClear function to handle the Clear editing command when applied to data selected in a viewer object.

MAC OS VERSION

OSErr Q3ViewerClear (TQ3ViewerObject theViewer);

WINDOWS VERSION

TQ3Status Q3WinViewerClear (TQ3ViewerObject viewer);

PARAMETER

theViewer
A viewer object.

DESCRIPTION

The Q3ViewerClear function clears the data currently selected in the viewer object specified by the theViewer parameter. No data is copied onto the Clipboard. You should call Q3ViewerClear when the user chooses the Clear command in your application's Edit menu (or types the appropriate keyboard equivalent) and the selected data is inside a viewer pane.

Q3ViewerUndo

You can use the Q3ViewerUndo function to handle the Undo command when applied to the most recent editing change to a viewer object.

MAC OS VERSION

OSErr Q3ViewerUndo (TQ3ViewerObject theViewer);

WINDOWS VERSION

TQ3Status Q3WinViewerUndo (TQ3ViewerObject viewer);

PARAMETER

theViewer
A viewer object.

DESCRIPTION

The Q3ViewerUndo function undoes the most recent editing operation on the viewer object specified by the theViewer parameter. You should call Q3ViewerUndo when the user chooses the Undo command in your application's Edit menu (or types the appropriate keyboard equivalent).

SPECIAL CONSIDERATIONS

The Q3ViewerUndo function is available only in versions 1.1 and later of the 3D Viewer.

SEE ALSO

Use Q3ViewerGetUndoString [link] to determine what string to display as part of the Undo item in the Edit menu. Use Q3ViewerGetState (link) to determine if the Undo command is currently available.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |